﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/SecretaryMaster.Master" AutoEventWireup="true" CodeBehind="Buscar.aspx.cs" Inherits="Interfaces.Orden.Buscar" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style7
        {
            width: 131px;
        }
        .style13
        {
            width: 144px;
            height: 167px;
        }
        .style14
        {
            width: 537px;
            height: 167px;
        }
        .style28
        {
            width: 146px;
            text-align: right;
        }
        .style32
        {
            width: 34px;
        }
        .style34
        {
            width: 47px;
        }
        .style36
        {
            width: 90px;
            text-align: right;
        }
        .style37
        {
            width: 63px;
        }
        .style38
        {
            width: 130px;
        }
        .style40
        {
            width: 13px;
        }
        .style41
        {
            width: 143px;
            text-align: right;
        }
        .style42
        {
            width: 13px;
            height: 26px;
        }
        .style43
        {
            height: 26px;
        }
        .style44
        {
            height: 167px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:Panel ID="Panel1" runat="server" GroupingText="Buscar Orden" 
        style="text-align: left" Height="836px">
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <table style="width:100%;">
                    <tr>
                        <td class="style42">
                            </td>
                        <td class="style43">
                            <asp:RadioButton ID="RadioButtonFecha" runat="server" GroupName="Buscar" 
                                Text="Por intervalo de fecha" AutoPostBack="True" Checked="True" 
                                oncheckedchanged="RadioButtonFecha_CheckedChanged" />
                        </td>
                        <td class="style43">
                            </td>
                    </tr>
                    <tr>
                        <td class="style40">
                            &nbsp;</td>
                        <td>
                            <asp:RadioButton ID="RadioButtonNro" runat="server" GroupName="Buscar" 
                                Text="Por número y año" AutoPostBack="True" 
                                oncheckedchanged="RadioButtonNro_CheckedChanged" />
                        </td>
                        <td>
                            &nbsp;</td>
                    </tr>
                    <tr>
                        <td class="style40">
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                        <td>
                            &nbsp;</td>
                    </tr>
                </table>
                <br />
                <asp:Panel ID="Panel2" runat="server" GroupingText="Buscar">
                    <table style="width: 100%; margin-bottom: 6px;">
                        <tr>
                            <td class="style41">
                                &nbsp;</td>
                            <td class="style36">
                                De:</td>
                            <td class="style7">
                                <asp:TextBox ID="deFecha" runat="server" Enabled="False" 
                                    style="text-align: left" Width="120px"></asp:TextBox>
                                <ajaxToolkit:CalendarExtender ID="deFecha_CalendarExtender" runat="server" 
                                    Format="yyyy-MM-dd" PopupButtonID="ImageButton1" TargetControlID="deFecha">
                                </ajaxToolkit:CalendarExtender>
                            </td>
                            <td class="style37">
                                <asp:ImageButton ID="ImageButton1" runat="server" 
                                    ImageUrl="~/Images/calendar.jpg" />
                            </td>
                            <td class="style32">
                                A:</td>
                            <td class="style38">
                                <asp:TextBox ID="aFecha" runat="server" Enabled="False" 
                                    style="margin-left: 0px" Width="120px"></asp:TextBox>
                                <ajaxToolkit:CalendarExtender ID="aFecha_CalendarExtender" runat="server" 
                                    Format="yyyy-MM-dd" PopupButtonID="ImageButton2" TargetControlID="aFecha">
                                </ajaxToolkit:CalendarExtender>
                            </td>
                            <td class="style34">
                                <asp:ImageButton ID="ImageButton2" runat="server" 
                                    ImageUrl="~/Images/calendar.jpg" />
                            </td>
                            <td>
                                <asp:Button ID="BuscarButton" runat="server" onclick="BuscarButton_Click" 
                                    Text="Buscar" Width="60px" CssClass="JCIstyle"/>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <br />
                <asp:Panel ID="Panel3" runat="server" GroupingText="Buscar" Visible="False">
                    <table style="width: 100%; margin-bottom: 6px;">
                        <tr>
                            <td class="style28">
                                &nbsp;</td>
                            <td class="style36">
                                Año:</td>
                            <td class="style7">
                                <asp:TextBox ID="AnioText" runat="server" MaxLength="4" 
                                    style="margin-left: 0px" Width="120px"></asp:TextBox>
                                <ajaxToolkit:FilteredTextBoxExtender ID="AnioText_FilteredTextBoxExtender" 
                                    runat="server" FilterType="Numbers" TargetControlID="AnioText">
                                </ajaxToolkit:FilteredTextBoxExtender>
                            </td>
                            <td class="style37">
                                &nbsp;</td>
                            <td class="style32">
                                Número:</td>
                            <td class="style38">
                                <asp:TextBox ID="NroText" runat="server" MaxLength="4" Width="120px"></asp:TextBox>
                                <ajaxToolkit:FilteredTextBoxExtender ID="NroText_FilteredTextBoxExtender" 
                                    runat="server" FilterType="Numbers" TargetControlID="NroText">
                                </ajaxToolkit:FilteredTextBoxExtender>
                            </td>
                            <td class="style34">
                                &nbsp;</td>
                            <td>
                                <asp:Button ID="BuscarAño" runat="server" onclick="BuscarAño_Click" 
                                    Text="Buscar" Width="60px" CssClass="JCIstyle"/>
                            </td>
                        </tr>
                    </table>
                </asp:Panel>
                <br />
                <br />
                <asp:Label ID="LabelError" runat="server" ForeColor="Red"></asp:Label>
                <br />
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:UpdatePanel ID="UpdatePanel3" runat="server">
            <ContentTemplate>
                <table style="width:100%; height: 223px;">
                    <tr>
                        <td class="style13">
                            </td>
                        <td class="style14">
                        
                            <asp:DataList ID="DataList1" runat="server" 
                                onitemcommand="DataList1_ItemCommand" 
                                onselectedindexchanged="DataList1_SelectedIndexChanged">
                                <HeaderTemplate>
                                    <tr style="color: #000000">
                                        <td style='border:2px solid #123456;' bgcolor="#3a67b1">
                                            Nro</td>
                                        <td style='border:2px solid #123456;' bgcolor="#3a67b1">
                                            Fecha</td>
                                        <td style='border:2px solid #123456;' bgcolor="#3a67b1">
                                            Fecha Ultima modificación</td>
                                        <td style='border:2px solid #123456;' bgcolor="#3a67b1">
                                            Aprobada</td>
                                    </tr>
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <tr style="color: #000000">
                                        <td style='border:2px solid #123456;'>
                                            <asp:Label ID="Nro" runat="server" Text='<%# Eval("Nro") %>'></asp:Label>
                                        </td>
                                        <td style='border:2px solid #123456;'>
                                            <asp:Label ID="Fecha" runat="server" Text='<%# Eval("Fecha") %>'></asp:Label>
                                        </td>
                                        <td style='border:2px solid #123456;'>
                                            <asp:Label ID="FechaUltimaModificacion" runat="server" 
                                                Text='<%# Eval("FechaUltimaModificacion") %>'></asp:Label>
                                        </td>
                                        <td style='border:2px solid #123456;'>
                                            <asp:Label ID="Aprobada" runat="server" Text='<%# Eval("Aprobada") %>'></asp:Label>
                                        </td>
                                        <td style='border:2px solid #123456;'>
                                            <asp:LinkButton ID="Modificar" runat="server" CommandName="Modificar" 
                                                Visible='<%# ((bool)Eval("Secre")) == false ? false:true %>'>Modificar</asp:LinkButton>
                                        </td>
                                        <td style='border:2px solid #123456;'>
                                            <asp:LinkButton ID="Ver" runat="server" CommandName="Ver">Ver</asp:LinkButton>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:DataList>
                            <br />
                        </td>
                        <td class="style44">
                            <br />
                            <br />
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
        </asp:UpdatePanel>
        <br />
        <br />
    </asp:Panel>
        <br />
    <br />
    <br />
    <br />
</asp:Content>
